{% extends 'base.html' %}

{% block body %}

<h2>New</h2>

<a href="/">&lt&ltback</a>
{% if session.logged_in %}
<form action="{{ url_for('add') }}" method=post class=add-entry>
    <dl>
        <dt>Title:
        <dd><input type=text size=30 name=title>
        <dt>Text:
        <dd><textarea rows=30 cols=70 name=text></textarea>
        <dt>Targets:
<!--        <dd><input type=text size=30 name=targetlist>&nbsp;<a>(split with ';'!)</a> -->
        <dd><input id="input1" name="targets" readonly="readonly" onfocus="f()" style="width:400px"><br/><br>
        <div id="div1" onmouseleave="l()">
        {% for target in fulltargets %}
            <input type="checkbox" name="target" value="{{ target }}" onclick="c()">{{ target }}<br/>
        {% endfor %}
        </div>
    </dl>
    <input type="submit" value="add">
</form>

{% else %}
    <p class=error>
    <strong>Error:</strong>
    log in please!!
    </p>

{% endif %}

{% endblock %}

